#coding:utf-8
from flask import Flask,request,jsonify

app = Flask(__name__)

class Config(object):
    DEBUG = True

app.config.from_object(Config)

@app.route('/')
def index():
    return 'index'

@app.route('/login',methods=['POST'])
def login():
    print(request.args.get('code'))
    print(request.data)
    print(request.get_data())
    json_data = request.json
    print(json_data)
    mobile = json_data.get("mobile")
    print(mobile)
    password = json_data.get("password")
    print(password)
    return jsonify(mobile=mobile,password=password)



if __name__ == '__main__':
    app.run()
